<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:mo="https://gitee.com/aun/Timo1"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<body>
<style>
    .form-search .layui-form-label {
        display: block;
    }
</style>
<div class="layui-card">

    <div class="layui-card-body">

        <div class="layui-card-table layui-tab">
            <div class="layui-tab-content">
                <form  class="layui-form layui-form-pane form-search" action="/pcs/porter/refundlist" onsubmit="return false" method="get" autocomplete="off">

                    <div class="layui-form-item layui-inline">
                        <label class="layui-form-label">退款状态</label>
                        <div class="layui-input-inline">
                            <select name="backStatus" >
                                <option value="">全部</option>
                                <option value="0">失败</option>
                                <option value="1">成功</option>
                                <option value="2">退款中</option>
                            </select>
                        </div>
                    </div>


                    <div class="layui-form-item layui-inline">
                        <button class="layui-btn layui-btn-primary"><i class="layui-icon">&#xe615;</i> 搜 索</button>
<!--                        <button type="reset" class="layui-btn layui-btn-primary" onclick="$.form.reload();">重置</button>-->
                    </div>
                </form>
                <table id="RefundsTable"  data-url='/pcs/order/refundlist' data-target-search="form.form-search"></table>
                <script th:inline="javascript">
                    var orderNo = [[${orderNo}]]
                    var operatorStatus = [[${operatorStatus}]]
                </script>
                <script type="text/javascript" th:inline="none">
                    $(function () {
                        $('#RefundsTable').layTable({
                            even: true,
                            where:{
                                orderNo:orderNo,
                                operatorStatus:operatorStatus,
                            },
                            cols: [[
                                {title: '序号', type: 'numbers', width: 80},
                                {field: 'orderNo', title: '订单编号', minWidth: 220, align: 'center'},
                                {field: 'outRefundNo', title: '退款订单号', minWidth: 220, align: 'center'},
                                {field: 'patientName', title: '患者姓名', minWidth: 100, align: 'center'},
                                {field: 'outRefundFee', title: '退款金额', minWidth: 100, align: 'center'},
                                {field: 'backStatus', title: '退款状态', minWidth: 180, align: 'center',templet: function (d) {
                                        if (d.backStatus === 1) {
                                            return '成功';
                                        } else if (d.backStatus === 2) {
                                            return '支付中';
                                        } else {
                                            return '失败：'+d.msg;
                                        }
                                    }},
                                {field: 'createTime', title: '创建时间', minWidth: 100, align: 'center'},
                            ]]
                        });
                    });

                </script>

            </div>
        </div>
    </div>

</div>
</body>
</html>